import BaseApi from './BaseApi';
// 生产
let url ='https://wechat.chinalife-p.com.cn/wechatpageservice/'
let  authorizeUrl ='https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx5668b394c2053c79&redirect_uri=https%3a%2f%2fwechat.chinalife-p.com.cn%2fwechatpageview%2f'
let authorizeUrlAppid='%3fappid%3dwx5668b394c2053c79&response_type=code&aaa=aa&scope=snsapi_base&state='      

//测试
// let url='https://wechattest.chinalife-p.com.cn/wechatpageservice/'
// let  authorizeUrl ='https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxfff02f5775cefff7&redirect_uri=https%3a%2f%2fwechattest.chinalife-p.com.cn%2fwechatpageview%2f'//授权前半部分链接
// let authorizeUrlAppid='%3fappid%3dwxfff02f5775cefff7&response_type=code&aaa=aa&scope=snsapi_base&state='      
const QueryTheListOfOutlets =
  url+'interface/QueryTheListOfOutlets.do'; //网点列表查询默认展示客户所在位置附近及所属城市内所有网点
const getBookingVolume = url+'interface/getBookingVolume.do'; //查询当前网点未来七天工作日,营业时间内预约量、剩余量情况
const collectCustomerInformation =
  url+'interface/collectCustomerInformation.do'; //采集客户信息、预约信息保存
const queryLineUp = url+'interface/queryLineUp.do'; //列表排队查询
const isOneLoad = url+'interface/isoneload.do'; //查询是否是第一次进入
const inquireAbout = url+'interface/inquireAbout.do'; //我的预约列表查询
const evaluate = url+'interface/evaluate.do'; //我的预约评价
const cancel = url+'interface/cancel.do'; //我的预约取消预约
const getSignature = url+'referrer/getSignature.do';//获取签名
const geocoder = 'https://apis.map.qq.com/ws/geocoder/v1/';//获取城市编码
const showInfo = url+'syCustomerInfo/showInfo.do';//获取unionid
const getValidateCode = url+'validatePhone/getValidateCode.do';//获取验证码
const getCheckCodeOne = url+'bind/getCheckCode1.do';//获取验证码
const finishTask = url+'integral/finishTask.do';
const bindWithQuestion = url+'bind/bindWithQuestion.do';//绑定三要素增加level权限和与本人关系下拉选择
const queryUserInfoByPhone =url+'userInfForApp/queryUserInfoByPhone.do';
const checkValidateCode = url+'validatePhone/checkValidateCode.do';//根据手机号查询userId和三要素信息
const checkMessageAuthen = url+'appeal/checkMessageAuthen.do';//用户执行微信内容短信验证判断
const checkBindWithLimit = url+'bind/checkBindWithLimit.do';
const checkBindWithoutLimit = url+'bind/checkBindWithoutLimit.do';
const submitUnBind = url+'bind/submitUnBind.do';
const desStringUserId = url+'selfhelp/desStringUserId.do';
const toQuery = url+'policy/toQuery.do';
const getBindQuestion = url+'bind/getBindQuestion.do';
const getThreeidById = url+"programCustomer/getThreeidById.do"
const getUnionIdAndOpenId = url+"interface/getUnionIdAndOpenId.do"
const getMyBussinessCardURL = url+"myBussinessCardAction/getMyBussinessCard.do"
const getCheckCodeOneURL = url+"bind/getCheckCode1.do"
const userByPhone = url+"Intergration/getIntergrationUserByPhone.do"
const getMyBussinessCardDetailURL = url+"myBussinessCardAction/getMyBussinessCardDetail.do"
const queryAddressInfoURL = url+"userInfForApp/queryAddressInfo.do"
const saveEAInfoURL = url+"userInfForApp/saveEAInfo.do"
const submitUnbindIntergrationUser=url+'Intergration/submitUnbindIntergrationUser.do'
const sendServiceMessage = url+'interface/sendServiceMessage.do';// 发送模板消息
const getMyBussinessCard =url+'myBussinessCardAction/getMyBussinessCard.do'//保单列表信息
const getMyBussinessCardDetail=url+'myBussinessCardAction/getMyBussinessCardDetail.do'
const getMyPolicyListsInf=url+'query/getMyPolicyListsInf.do'
const getMyPolicyDetailInfURL = url+'query/getMyPolicyDetailInf.do'//保单详情
const personCertificateURL = url+'electpolicy/personCertificate.do'
const checkpolicyURL = url+'electpolicy/check.do'
const desStringUserIdURL =url+'selfhelp/desStringUserId.do'
const queryUserInfoByIdURL =url+'userInfForApp/queryUserInfoById.do'
const getThreeidByIdURL =url+'programCustomer/getThreeidById.do'
const personCentificateSendToEmailURL=url+'policy/personCentificateSendToEmail.do'
const sendToEmailURL=url+'policy/sendToEmail.do'
const notificationURL = url + 'messageCenter/queryMessageStatusByOpenId.do'
const notificationTypeUrl = url + 'wxBaseDate/findBaseDataByType.do'
const setMessageStatusByOpenId = url + 'messageCenter/setMessageStatusByOpenId.do'//邮箱消息更新状态
const acquireAbout = url + 'interface/acquireAbout.do' //取号提交
const face = url+'faceLogin/login.do'; //人脸识别接口
const peaceOfMind = url+"peaceOfMind/bindIdentity.do";//内部身份绑定
const imageDownload = url+"pdfToImage/imageDownload.do"//PDF转图片
const getToken = url+"peaceOfMind/getToken.do";//安心通获取token
const recommendPage = url+"peaceOfMind/recommendPage.do";//安心通内部人员邀请码
const saveToRedis = url+"centQuery/saveToRedis.do";//安心通内部人员邀请码
const peacequeryUserInfo = url+"peaceOfMind/queryUserInfo.do";//安心通内部人员信息
const newPointsInfo = url+"peaceOfMind/newPointsInfo.do";//查看保单
// const queryCent = url+"/wechatpage/centQuery/queryCent.do";//查看电子保单
const updateUnionidByOpenid = url+"myBussinessCardAction/updateUnionidByOpenid.do";

const partyHistory = url+'partyBuilding/partyBuilding.do'
// const partyHistory ='http://9.1.120.26:8080/gsc-app-forward/gscApp/forward'
export default class IndexApi extends BaseApi {
  
  async partyHistory(info: any) {
    return await this.post(partyHistory, info);
  }
  async saveEAInfoURL(info: any) {
    return await this.post(saveEAInfoURL, info);
  }
  async acquireAbout(info: any) {
    return await this.post(acquireAbout, info);
  }
  async queryAddressInfoURL(info: any) {
    return await this.post(queryAddressInfoURL, info);
  }
  async getMyBussinessCardDetailURL(info: any) {
    return await this.post(getMyBussinessCardDetailURL, info);
  }
  async userByPhone(info: any) {
    return await this.post(userByPhone, info);
  }
  async getCheckCodeOneURL(info: any) {
    return await this.post(getCheckCodeOneURL, info);
  }
  async getThreeidById(info: any) {
    return await this.post(getThreeidById, info);
  }
  async getMyBussinessCardURL(info: any) {
    return await this.post(getMyBussinessCardURL, info);
  }
  async QueryTheListOfOutlets(info: any) {
    return await this.post(QueryTheListOfOutlets, info);
  }
  async getBookingVolume(info: any) {
    return await this.post(getBookingVolume, info);
  }
  async collectCustomerInformation(info: any) {
    return await this.post(collectCustomerInformation, info);
  }
  async queryLineUp(info: any) {
    return await this.post(queryLineUp, info);
  }
  async isOneLoad(info: any) {
    return await this.post(isOneLoad, info);
  }
  async inquireAbout(info: any) {
    return await this.post(inquireAbout, info);
  }
  async evaluate(info: any) {
    return await this.post(evaluate, info);
  }
  async cancel(info: any) {
    return await this.post(cancel, info);
  }
  async getSignature(info: any) {
    return await this.post(getSignature, info);
  }
  async geocoder(info: any) {
    return await this.jsonp(geocoder, info);
  }
  async showInfo(info: any) {
    return await this.post(showInfo, info);
  }
  async getValidateCode(info: any) {
    return await this.post(getValidateCode, info);
  }
  async getCheckCodeOne(info: any) {
    return await this.post(getCheckCodeOne, info);
  }
  async finishTask(info: any) {
    return await this.post(finishTask, info);
  }
  async bindWithQuestion(info: any) {
    return await this.post(bindWithQuestion, info);
  }
  async queryUserInfoByPhone(info: any) {
    return await this.post(queryUserInfoByPhone, info);
  }
  async getMyBussinessCardDetail(info: any) {
    return await this.post(getMyBussinessCardDetail, info);
  }
  async checkValidateCode(info: any) {
    return await this.post(checkValidateCode, info);
  }
  async getMyBussinessCard(info: any) {
    return await this.post(getMyBussinessCard, info);
  }
  async checkMessageAuthen(info: any) {
    return await this.post(checkMessageAuthen, info);
  }
  async checkBindWithLimit(info: any) {
    return await this.post(checkBindWithLimit, info);
  }
  async checkBindWithoutLimit(info: any) {
    return await this.post(checkBindWithoutLimit, info);
  }
  async submitUnBind(info: any) {
    return await this.post(submitUnBind, info);
  }
  async desStringUserId(info: any) {
    return await this.post(desStringUserId, info);
  }
  async toQuery(info: any) {
    return await this.post(toQuery, info);
  }
  async getBindQuestion(info: any) {
    return await this.post(getBindQuestion, info);
  }
  async submitUnbindIntergrationUser(info: any) {
    return await this.post(submitUnbindIntergrationUser, info);
  }
  async getUnionIdAndOpenId(info: any){
    return await this.post(getUnionIdAndOpenId, info);
  }
  async sendServiceMessage(info: any){
    return await this.post(sendServiceMessage, info);
  }
  async getMyPolicyListsInf(info: any) {
    return await this.post(getMyPolicyListsInf, info);
  }
  async getMyPolicyDetailInfURL(info: any) {
    return await this.post(getMyPolicyDetailInfURL, info);
  }
  async personCertificateURL(info: any) {
    return await this.post(personCertificateURL, info);
  }
  async checkpolicyURL(info: any) {
    return await this.post(checkpolicyURL, info);
  }
  async desStringUserIdURL(info: any) {
    return await this.post(desStringUserIdURL, info);
  }
  async queryUserInfoByIdURL(info: any) {
    return await this.post(queryUserInfoByIdURL, info);
  }
  async getThreeidByIdURL(info: any) {
    return await this.post(getThreeidByIdURL, info);
  }
  // async getMyBussinessCardDetailURL(info: any) {
  //   return await this.post(getMyBussinessCardDetailURL, info);
  // }
  async personCentificateSendToEmailURL(info: any) {
    return await this.post(personCentificateSendToEmailURL, info);
  }
  async sendToEmailURL(info: any) {
    return await this.post(sendToEmailURL, info);
  }
  async notificationTypeUrl(info: any) {
    return await this.post(notificationTypeUrl, info);
  }
  async notificationURL(info: any) {
    return await this.post(notificationURL, info);
  }
  async setMessageStatusByOpenId(info: any) {
    return await this.post(setMessageStatusByOpenId, info);
  }
  //人脸识别
  async face(info: any) {
    return await this.post(face, info);
  }

  async peaceOfMind(info:any){
    return await this.post(peaceOfMind, info);
  }
  async imageDownload(info:any){
    return await this.post(imageDownload, info);
  }
  async getToken(info:any){
    return await this.post(getToken, info);
  }
  async recommendPage(info:any){
    return await this.post(recommendPage, info);
  }
  async saveToRedis(info:any){
    return await this.post(saveToRedis, info);
  }
  async peacequeryUserInfo(info:any){
    return await this.post(peacequeryUserInfo, info);
  } 
  async newPointsInfo(info:any){
    return await this.post(newPointsInfo, info);
  }
  async queryCent(info:any){
    return await this.post(queryCent, info);
  }
  async updateUnionidByOpenid(info:any){
	return await this.post(updateUnionidByOpenid,info);
  }
}
export const cloudApi = new IndexApi();
export { authorizeUrl,authorizeUrlAppid };

